home *** CD-ROM | disk | FTP | other *** search
/ Nejlepší České Hry / Nej české hry.iso / hry / vesmirna becherovka / 2004 Vesmírná Becherovka / Becherovka.exe / scripts / DefineSprite_1168 / frame_1 / DoAction.as < prev   
Encoding:
Text File  |  2004-09-30  |  1.5 KB  |  69 lines

  1. function Speak(Osoba, SText, Orient, EngText, Driver)
  2. {
  3.    if(Orient == "R")
  4.    {
  5.       X = getProperty(Osoba, _X) + Osoba.hx * Osoba._xscale / 100;
  6.    }
  7.    else
  8.    {
  9.       X = getProperty(Osoba, _X) - Osoba.hx * Osoba._xscale / 100;
  10.    }
  11.    Y = getProperty(Osoba, _Y) + Osoba.hy * Osoba._yscale / 100;
  12.    if(!_root.menu.eng)
  13.    {
  14.       _root.s.bubble.Text = SText;
  15.    }
  16.    else
  17.    {
  18.       _root.s.bubble.Text = EngText;
  19.    }
  20.    _root.s.bubble.Count = 12 + length(SText);
  21.    _root.s.bubble.i = 1;
  22.    _root.s.bubble.Osoba = Osoba;
  23.    _root.s.bubble.Driver = Driver;
  24.    _root.s.bubble.Orient = Orient;
  25.    if(Orient == "R")
  26.    {
  27.       _root.s.bubble.gotoAndPlay(4);
  28.       setProperty("_root.s.bubble", _X, X + Osoba._width / 1.5);
  29.    }
  30.    else
  31.    {
  32.       _root.s.bubble.gotoAndPlay(2);
  33.       setProperty("_root.s.bubble", _X, X - Osoba._width / 1.5);
  34.    }
  35.    setProperty("_root.s.bubble", _Y, Y - 30 * Osoba._xscale / 100);
  36.    if(Orient == "L" || Orient == "R")
  37.    {
  38.       tellTarget(Osoba)
  39.       {
  40.          gotoAndStop("SpeakR");
  41.          play();
  42.       }
  43.    }
  44.    else
  45.    {
  46.       tellTarget(Osoba)
  47.       {
  48.          gotoAndPlay("Speak" + Orient);
  49.       }
  50.    }
  51. }
  52. function ShowSipka()
  53. {
  54.    stopDrag();
  55.    _root.s.Look._x = -100;
  56.    _root.s.Look._y = -100;
  57.    _root.s.Ruka._x = -100;
  58.    _root.s.Ruka._y = -100;
  59.    _root.s.Bota._x = -100;
  60.    _root.s.Bota._y = -100;
  61.    _root.s.Pick._x = -100;
  62.    _root.s.Pick._y = -100;
  63.    Mouse.show();
  64. }
  65. function HideSipka()
  66. {
  67.    Mouse.hide();
  68. }
  69.